CREATE TABLE [dbo].[TTCORR_FINA]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[TI_DOCU] [dbo].[TD_VC_003] NOT NULL,
[ST_GENE_DOCU] [dbo].[TD_VC_001_SINO] NOT NULL CONSTRAINT [DF__TTCORR_FI__ST_GE__05CEBF1D] DEFAULT ('N'),
[NU_ULTI_CORR] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TTCORR_FI__NU_UL__07B7078F] DEFAULT ((0)),
[NU_LINE] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TTCORR_FI__NU_LI__08AB2BC8] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTCORR_FI__CO_US__099F5001] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTCORR_FI__FE_US__0A93743A] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTCORR_FI__CO_US__0B879873] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTCORR_FI__FE_US__0C7BBCAC] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTCORR_FINA] WITH NOCHECK ADD CONSTRAINT [CK__TTCORR_FI__ST_GE__06C2E356] CHECK NOT FOR REPLICATION (([ST_GENE_DOCU]='N' OR [ST_GENE_DOCU]='S'))
GO
ALTER TABLE [dbo].[TTCORR_FINA] ADD CONSTRAINT [PK__TTCORR_F__0290303D151BEFA5] PRIMARY KEY CLUSTERED  ([CO_EMPR], [TI_DOCU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTCORR_FINA] ADD CONSTRAINT [FK__TTCORR_FI__CO_EM__4F9D96F5] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMPARA_TESO] ([CO_EMPR])
GO
